package com.wc.ttt;

import java.util.function.BiFunction;

/**
 *@ClassName:DemoTest2
 *@Author: 鹿建文
 *@Date: 2022/3/23  - 16:59
 *@Describe:
 */ public class DemoTest2 {
     public  static  int fun(Integer num1, Integer num2, BiFunction<Integer,Integer,Integer>bf){
         Integer res = bf.apply(num1, num2);
         return res;
     }

    public static void main(String[] args) {
        System.out.println(fun(100,20,(num1,num2)->num1+num2));
        System.out.println(fun(100,20,(num1,num2)->num1-num2));
        System.out.println(fun(100,20,(num1,num2)->num1*num2));
        System.out.println(fun(100,20,(num1,num2)->num1/num2));
    }
}
